package com.lsw.jgyf.ui.activity;

import android.text.TextUtils;
import android.widget.TextView;

import com.lsw.jgyf.R;
import com.lsw.jgyf.ui.base.activity.TitleBarActivity;
import com.lsw.shareUser.ShareUserInfoUtil;

import butterknife.BindView;

/**
 * Created by lsw on 2018/9/24.
 */

public class PersonalCenterActivity extends TitleBarActivity implements PersonalCenterContract.View {

    @BindView(R.id.tv_name)
    TextView tv_name;
    @BindView(R.id.tv_phone)
    TextView tv_phone;
    @BindView(R.id.tv_juese)
    TextView tv_juese;
    @BindView(R.id.tv_suoshudianpu)
    TextView tv_suoshudianpu;

    @Override
    protected void initInjector() {

    }

    @Override
    protected void initEventAndData() {
        tv_name.setText(ShareUserInfoUtil.getInstance(mContext).getString(ShareUserInfoUtil.USERNAME, ""));
        tv_phone.setText(ShareUserInfoUtil.getInstance(mContext).getString(ShareUserInfoUtil.MOBILE, ""));
        tv_suoshudianpu.setText(ShareUserInfoUtil.getInstance(mContext).getString(ShareUserInfoUtil.STORE_NAME, ""));
        if (TextUtils.equals("1", ShareUserInfoUtil.getInstance(mContext).getString(ShareUserInfoUtil.TYPE, ""))) {
            tv_juese.setText("店长");
        } else {
            tv_juese.setText("店员");
        }

    }

    @Override
    protected int setContentLayoutView() {
        return R.layout.activity_personal_center;
    }

    @Override
    protected void setActionBarDetail() {

    }

    @Override
    public void setData() {

    }

    @Override
    public void openlogin() {
        OpenLogin();
    }
}
